package com.glsc.ngateway.common.base.domainmapper.cmdb;
import com.glsc.ngateway.common.base.domain.mysql.cmdb.CmdbPartStandard;
import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow.cmdb.FlowFormNewPartStandardDetail;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author: zhengyr
 * @Desc: domin到dto转换
 */
@Mapper(componentModel = "spring")
public interface FlowFormNewPartStandardMapper {

    FlowFormNewPartStandardMapper INSTANCE = Mappers.getMapper(FlowFormNewPartStandardMapper.class);

    @Mapping(target = "partStandardCode", ignore = true)
    @Mapping(target = "isDelete", ignore = true)
    @Mapping(target = "cmdbPartType" ,ignore = true)
    CmdbPartStandard dto2domain(FlowFormNewPartStandardDetail dto);

    List<CmdbPartStandard> dto2domain(List<FlowFormNewPartStandardDetail> dto);
}
